package com.qf.controller;

import com.qf.result.ResponseResult;
import com.qf.service.UploadService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

@RestController
@RequestMapping("/upload")
public class UploadController {

    @Resource
    private UploadService uploadService;

    @PostMapping
    public ResponseResult upload(MultipartFile img){
        return uploadService.uploadImg(img);
    }
}
